<?php 
/**
 * 站点虾米列表页模板
 */
if(!defined('EMLOG_ROOT')) {exit('error!');} 
?>
		<section id="content">
          <section class="vbox" id="bjax-el">
            <section id="bjax-target">
              <section class="hbox stretch">
                <!-- side content -->
                <aside class="aside bg-light dk" id="sidebar">
                  <section class="vbox animated fadeInUp">
                    <section class="scrollable hover">
                      <div class="list-group no-radius no-border no-bg m-t-n-xxs m-b-none auto">
                        <a href="<?php echo Url::sort(''._g('Xiami_SortUrl').''); ?>" class="list-group-item">
                          All
                        </a>
					<?php xiami_navi(); ?>
                      </div>
                    </section>
                  </section>
                </aside>
                <!-- / side content -->

                <section>
                  <section class="vbox">
                    <section class="scrollable padder-lg">
                      <h2 class="font-thin m-b">
             
                <?php if (isset($sortid)): ?>
                  <?php global $CACHE; $sort_cache = $CACHE->readCache('sort'); ?>
                  <?php  $pid = $sort_cache[$sortid]['pid'];?>
                   <?php if($pid != 0):?>
              <a href="<?php echo Url::sort($pid); ?>"><?php echo $sort_cache[$pid]['sortname'];?></a>&nbsp;&raquo;&nbsp;<!-- 父分类 -->
              <a href="<?php echo Url::sort($sortid); ?>"><?php echo $sort_cache[$sortid]['sortname']; ?></a><!-- 子分类 -->

                   <?php else:?>
              <a href="<?php echo Url::sort($sortid); ?>"><?php echo $sort_cache[$sortid]['sortname']; ?></a>

                   <?php endif;?>
                   <?php elseif (isset($author)): ?>
              <?php echo $author; ?><!-- 作者 -->
                   <?php elseif (isset($keyword)):?>
              <?php echo $keyword; ?><!-- 搜索词 -->
			       <?php elseif (isset($tag)):?>
              <?php echo $tag; ?><!-- 标签 -->
                   <?php elseif (isset($record)):?>
              <?php echo $record; ?><!-- 归档 -->
               <?php endif; ?>
			   </h2>
                      <div class="row row-sm">
<?php doAction('index_loglist_top'); ?>

<?php 
if (!empty($logs)):
	global $CACHE; 
$log_cache_sort = $CACHE->readCache('logsort');
foreach($logs as $value): 
?>

                        <div class="col-xs-6 col-sm-4 col-md-3 col-lg-2">
                          <div class="item">
                            <div class="pos-rlt">
                              <div class="item-overlay opacity r r-2x bg-black">
                                <div class="center text-center m-t-n">
                                  <a href="<?php echo $value['log_url']; ?>">
								  <i class="fa fa-play-circle i-2x"></i></a>
                                </div>
                              </div>
							  
                              <a href="<?php echo $value['log_url']; ?>">
							  <img src="<?php XiamiImg($value['content'], $value['logid'])?>" height="140" alt="<?php echo $value['log_title']; ?>" class="r r-2x img-full"></a>
                            </div>
                            <div class="padder-v">
                              <a href="<?php echo $value['log_url']; ?>" class="text-ellipsis"><?php echo $value['log_title']; ?></a>
                              <a href="<?php echo Url::sort($log_cache_sort[$value['logid']]['id']); ?>" class="text-ellipsis text-xs text-muted"><?php echo $log_cache_sort[$value['logid']]['name']; ?></a>
                            </div>
                          </div>
                        </div>
<?php 
endforeach;
else:
?>
	<h2>未找到</h2>
	<p>抱歉，没有符合您查询条件的结果。</p>
<?php endif;?>

                      </div>
<?php if ($page_url):?>
  <ul class="pagination pagination">
<?php 
$page_loglist = my_page($lognum, $index_lognum, $page, $pageurl);
echo $page_loglist;
?>
  </ul><!--pagination pagination-->
<?php endif;?>
                    </section>                    
                  </section>
                </section>
              </section>
            </section>

          </section>
          <a href="#" class="hide nav-off-screen-block" data-toggle="class:nav-off-screen,open" data-target="#nav,html"></a>
        </section>
      </section>
    </section>    
  </section>
<?php
 include View::getView('footer');
?>